<?php
	session_start();
	include ("../includes/conn.php");

	extract($_REQUEST, EXTR_PREFIX_ALL|EXTR_REFS, 'v');
	if(isset($v_addsign)){$addsign=$v_addsign;}
	if(isset($v_qtychg)){$qtychg=$v_qtychg;}
	if(isset($v_button)){$button=$v_button;}
	if(isset($v_button2)){$button2=$v_button2;}
	if(isset($v_button3)){$button3=$v_button3;}
	if(isset($v_button4)){$button4=$v_button4; $cart=1;}
	if(isset($v_button5)){$button5=$v_button5;}
	if(isset($v_cart)){$cart=$v_cart;}
	$csn=$v_csn;
	if(isset($v_catanumber)){$catanumber=$v_catanumber;}else{$catanumber=$v_catno;}
	
	if (!isset($_SESSION['id'])){
		$_SESSION['id'] = md5(rand());
	}
	
	//add product to shopping cart
	if (isset($addsign) && $addsign == '1'){
		require_once("../includes/cart.php");
	}
	
	//update shopping cart when amount and/or promo code change
	if (isset($button) && $button == 'Update'){
		if ($qtychg <> ''){
			require_once("../includes/cart-upd.php");
		}
	}
	
	// delete selected product in shopping cart
	if (isset($button2) && $button2 == 'Remove'){
		require_once ('../includes/cart-delete.php');
	}
	
	//empty all products in shopping cart
	if (isset($button5) && $button5 == 'Clear All' ){
		require_once ('../includes/cart-empty.php');
	}
	
	//check out shopping cart for payment
	if (isset($button3) && $button3 == 'Check Out' ){
		echo "<script language=javascript>location.href='/cart-checkout.php';</script>";
		exit;
	}
	
	if (!isset($cart)){
		$cart = 0;
	}
	
	if (isset($catanumber)){
		$prd1 = "select * from prodlysates where catNo like '$catanumber'";
		$prd_res1 = mysql_query($prd1,$db);
		$pdr1 = mysql_fetch_array($prd_res1);
		$ssn=$pdr1['ssn'];
		$dsn=$pdr1['dsn'];
		$catno=$catanumber;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<?php include ("../includes/title.php");?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<?php echo $prodname;?>, premade, pre-made, protein Lysate, expression" />
<meta name='description' content='Recombinant, premade <?php echo $prodname;?> protein lysate have great potential in research applications by expressing <?php echo $subcatname;?> protein.' />
<link rel="shortcut icon" href="/images/logo.ico" type="image/x-icon">
<link href="/style/abmnew.css" rel="stylesheet" type="text/css" />
<link href="/style/mirna.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#submenu {
	background:url(/premadeProteinLysate/images/banner-stemcelldna.jpg) right top;
	background-repeat:no-repeat;
}
#prod-name {
	font-family:Arial, Helvetica, sans-serif;
	font-weight:bold;
	font-size:16px;
	color:#000;
	margin-top:-1px;
}
</style>
<script type="text/javascript">
	function vectorpage(param){
	window.open("/viralexp/vectorDisplay.php?vec=" + param,"_blank","directories=no,width=1000px,height=650px,left=0,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no");
	}
</script>
</head>
<body>
<script type="text/javascript">
	function vectorpage(param){
	window.open("/vectors/vectorDisplay.php?vec=" + param,"_blank","directories=no,width=1000px,height=650px,left=0,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no");
	}
</script>
<?php include ("../includes/header.php");?>
<div id="content">
<?php include ("../includes/logosearch.php");?>
<div id='container'>
  <div id='leftmenu'>
    <?php include ("../includes/leftMenu.php");?>
  </div>
  <div id='rightcontent'>
    <div id='submenu'>
      <div id='subtitle'><?php echo"$catname";?></div>
    </div>
      <?php include ("../includes/premadeSiRNAsrch.php");?>
    <div id='title'>
      <?php 
				//get pathway
				$grp = "select * from category where sn = 8";
				$grp_res = mysql_query($grp,$db);
				$grp_rows = mysql_num_rows ($grp_res);
				if ($grp_rows > 0){
					$grp_r = mysql_fetch_array($grp_res);
					$grpName = $grp_r['cname'];
					
					$sub = "select * from subcat where csn = 8 and sn = $ssn";
					$sub_res = mysql_query($sub,$db);
					$sub_rows = mysql_num_rows ($sub_res);
					if ($sub_rows > 0){
						$sub_r = mysql_fetch_array($sub_res);
						$subName = $sub_r['sname'];
					}
				}
				echo "$subName Protein Lysate";
			?>
    </div>
      <div id='backbutton' itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
      	<span itemprop="title">
        	<a href='/' title='home page' itemprop="url">Home</a>&nbsp;&raquo;&nbsp;
        </span>
      </div>
        <div id='backbutton' itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
			<?php echo "
			<span itemprop=\"title\">
				<a href='/Protein-Lysates.html' title='Premade Protein Lysates' itemprop=\"url\">$catname</a>&nbsp;&raquo;&nbsp;
			</span>
		</div>
		<div id='backbutton' itemscope itemtype=\"http://data-vocabulary.org/Breadcrumb\">
			<span itemprop=\"title\"><a href='/$subName-Protein-Lysates--$subName.html' itemprop=\"url\" title='$subName Protein Lysates $subName'>$subName Protein Lysates</a>
			</span>
			<a href='/$subName-Protein-Lysates--$subName.html' title='$subName Protein Lysates $subName'>";?><img src="/StemCell/images/arrow.png" width="5" height="10" border="0" alt="go back to parent page" /> Back</a>
        </div>
    
    <div id='prod-tab'>
        <?php
			//sets required variables if not set
			if (isset ($cart)){} else{$cart=0;}
            if (isset ($page)){} else{$page="data";}
			?>
        <?php
			//displays tabs in different forms based on 'page type' selected, they are in seperate php tags as otherwise no space appears between the tabs 
			if ($page=="data"){
				echo "<div id='tab-focus'>Data Sheet</div>";
			}else{
				echo "<div id='tab-leave'><a href=''>Data Sheet</a></div>";
			}
			echo "
				<div id='tab-leave'>Protocol</div>
				<div id='tab-leave'>MSDS</div>
				<div id='tab-leave'><a href='#faqs' title='$prodname FAQs'>FAQs</a></div>
				<div id='tab-leave'>Reviews</div>";
		?>
        <?php 
				if (isset($_SESSION['usr']) && isset($_SESSION['admin'])){
					if ($_SESSION['admin']<>3){
						echo "
							<div id='tab-leave'>Edit</div>
							<div id='tab-leave'>Delete</div>
						";
					}
				}
			?>
    </div>
    <div id='prod-detail'>
      <div id='order'>
        <div id='prod-name'><?php echo"$prodname";?></div>
        <div id='order-online'>Order Online</div>
        <div id='order-bycontact'>Order by Contact</div>
        <div id='addtocart'>
          <form id='form1' name='form1' method='post' action=''>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="41%"><span>Cat.No.:</span></td>
                <td width="59%"><?php echo $pdr['catNo']; ?></td>
              </tr>
              <tr>
                <td>Quantity:</td>
                <td><?php echo $pdr['quantity']; ?></td>
              </tr>
              <tr>
                <td>Price:</td>
                <td><span style='color:#F60; font-weight:bold;'>
				<?php 
					if ($pdr['price'] == 0 ){
						echo"Inquire";
					}else{
						$price = $pdr['price'];
						echo"$$price";
					}?>													
              </tr>
              <tr>
                <td colspan="2" style="height:30px; vertical-align:bottom;">Qty.:
                  <input name="orderquan" type="text" id="orderquan" size="1" value="1" style="border:1px dotted #999; font-size:12px; color:#039; padding:1px; font-weight:bold;" />
                  <input type="submit" name="add" id="add" title='Add Protein Lysate to Cart' value="Add to Cart" />
                  <input name='catno' type='hidden' id='catno' value='<?php echo $pdr['catNo'];?>'/>
                  <input name='quan' type='hidden' id='quan' value='<?php echo $pdr['quantity'];?>'/>
                  <input name='price' type='hidden' id='price' value='<?php echo $pdr['price'];?>'/>
                  <input name='pname' type='hidden' id='pname' value='<?php echo $pdr['pname'];?>'/>
                  <input name='supplier' type='hidden' id='supplier' value='<?php echo $pdr['supplier'];?>'/>
                  <input name='csn' type='hidden' id='csn' value='<?php echo $csn;?>'/>
                  <input name='ssn' type='hidden' id='ssn' value='<?php echo $ssn;?>'/>
                  <input name='dsn' type='hidden' id='dsn' value='<?php echo $dsn;?>'/>
                  <input name='pcat' type='hidden' id='pcat' value='<?php echo $csn;?>'/>
                  <input name='car' type='hidden' id='car' value='1'/>
                  <input type="hidden" name="addsign" id="addsign" value='1' /></td>
              </tr>
            </table>
          </form>
        </div>
        <div id='contactinfo'>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="19%">Email:</td>
              <td width="81%"><a href='mailto:order@abmGood.com' title='Order by Email'>order@abmGood.com</a></td>
            </tr>
            <tr>
              <td>Phone:</td>
              <td><span style="font-size:13px;">604-247-2416 (Local), 1-866-757-2414 (Toll free)</span></td>
            </tr>
            <tr>
              <td>Fax:</td>
              <td><span style="font-size:13px;">604-247-2414</span></td>
            </tr>
            <tr>
              <td>Payment:</td>
              <td><img src='/img/mastercard.gif' width='25' height='16' border='0' align='absmiddle' /> <img src='/img/visa.gif' width='25' height='16' border='0' align='absmiddle' /> or Purchase Order Number</td>
            </tr>
            <tr>
              <td>More info:</td>
              <td><a href="/misc/orders.php" title='Ordering Information'>Additional Information Regarding Orders</a></td>
            </tr>
          </table>
        </div>
      </div>
      <div id='cart'><a href='?cart=<?php echo ($cart+1)%2;?>&amp;catno=<?php echo "$catno&amp;csn=$csn&amp;ssn=$ssn&amp;dsn=$dsn&alpha=$alpha"; ?>' title='Display/Hide Cart'><img id="carttab" src="/images/cart.png" border="0" /></a></div>
      <?php include('../includes/shoppingCart.php');?> 
      <?php
			  //displays data sheet information for ALL product types
			 switch ($page){
				case "data":
					$pdsql="select * from prodlysates where catNo='$catno'";
					$pdres=mysql_query($pdsql,$db);
					$pdrw=mysql_num_rows($pdres);
					if ($pdrw>0){
					  //displays data sheet information for ALL product types
							echo"
							<div id='tab-title'>Data Sheet</div>
							<div id='tab-detail'>
							<table width='100%' border='0' cellspacing='0' cellpadding='0'>
							  <tr>
									<td width='25%'></td>
									<td width='75%' style='text-align:right; font-size:12px;'><a href='/premadeProteinLysate/pvPrint.php?csn=$csn&ssn=$ssn&dsn=$dsn&catno=$catno'>Print Version</a></td>
							  </tr>
						";
							while ($pdr=mysql_fetch_array($pdres)){
								if ($pdr['accessionNo']<>""){
									echo"
									  <tr>
										<td><span>Accession #</span></td>
										<td><a href='http://www.ncbi.nlm.nih.gov/nuccore/".$pdr['accessionNo']."' target='_blank'>".$pdr['accessionNo']."</a></td>
									  </tr>";
								}
								if ($pdr['description']<>""){
									echo"
									  <tr>
										<td><span>Description</span></td>
										<td>".$pdr['description']." $subcatname</td>
									  </tr>";
								}
								if ($pdr['source']<>""){
									echo"
									  <tr>
										<td><span>Source</span></td>
										<td>".$pdr['source']."</td>
									  </tr>";
								}
								if ($pdr['application']<>""){
									echo"
									  <tr>
										<td><span>Application</span></td>
										<td>".$pdr['application']."</td>
									  </tr>";
								}
								if ($pdr['storage']<>""){
									echo"
									  <tr>
										<td><span>Storage Buffer</span></td>
										<td>".$pdr['storage']."</td>
									  </tr>";
								}
								if ($pdr['handling']<>""){
									echo"
									  <tr>
										<td><span>Storage Conditions</span></td>
										<td>".$pdr['handling']."</td>
									  </tr>";
								}
								echo"
									  <tr>
										<td><span>Caution</span></td>
										<td>$prodname is for research use only and is not intended for therapeutic or diagnostic applications. Please contact a technical service representative for more information.</td>
									  </tr>";
									  $lookingBC=substr_count($pdr['accessionNo'],'BC');
									  if($lookingBC<>0){echo"<tr>
										<td><span>Notes</span></td>
										<td>This product may or may not contain the full length CDS of the gene due to the gene synthesis reaction. The insert sequence (CDS region only) can be found via the Accession Number, which links to the NCBI site. We suggest to carefully review the sequence first to see if the product is applicable for your research. If you have any questions, please contact us prior to ordering. All sales are final.</td>
									  </tr>";
									  }else{echo"<tr>
										<td><span>Notes</span></td>
										<td>This product may or may not contain the full length protein of the gene due to the gene synthesis reaction.  Please contact us for the sequence prior to ordering.  All sales are final.</td>
									  </tr>";
									  }
								
							}
					  			
					 		echo"</table>
						</div>
						<a name='faqs'></a>
						<div id='tab-title'>FAQs</div>
							<div id='tab-detail'>";
							include ("../FAQ/faq.php");
						echo "
							</div>
						</div>";
					}
				    break;
					//displays MSDS information for virus products
					case "MSDS":
						echo "
						<div id='tab-title'>MSDS</div>
							<div id='MSDS'>";
							include ("../includes/UTRChemMSDS.php");
						echo "
							</div>
						</div>
						";
					 break;
					//displays protocol information for adeno products 
					case "protocol":
						echo "
						<div id='tab-title'>Protocol</div>
							<div id='MSDS'>";
							include ("../includes/$protocol.php");
						echo "
							</div>
						</div>
						";
					 break;
				  }
			 ?>
      </div>
    </div>
  </div>
</div>
<?php include('../includes/footer.php');?>

<!-- Piwik --> 
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.abmgood.com/piwik/" : "http://www.abmgood.com/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<noscript>
<p><img src="http://www.abmgood.com/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p>
</noscript>
<!-- End Piwik Tag -->
</body>
</html>
